import React, { useContext } from 'react'
import Son from './Son'
import context from './context'
export default function Father() {
    let { name, age, findMother } = useContext(context)


    return (
        <div>
            <h1>Father</h1>
            <div>Father---{name}</div>
            <div>Father---{age}</div>
            <button onClick={() => {
                findMother('father-mother')
            }}>找妈妈</button>
            <Son></Son>
        </div>
    )
}
